import pygame, objects

#short init section for pygame
pygame.init()
size = [840, 600]
screen = pygame.display.set_mode(size)
pygame.display.set_caption("DUNGEONBASTARD")

#random variables
done = False
clock = pygame.time.Clock()
keys = set([])
green = [0, 255, 0]

#INIT THE PLAYER
player = objects.OBJ()
player.Location = [200, 200]

while done == False:

	clock.tick(60)

	for event in pygame.event.get():
		if event.type == pygame.QUIT:
			done = True
		if event.type == pygame.KEYDOWN:
			keys.add(event.key)
		if event.type == pygame.KEYUP:
			keys.discard(event.key)

	for key in keys:	
		if key == 273:
			player.Location = [player.Location[0], player.Location[1] - 5]
		if key == 274:
			player.Location = [player.Location[0], player.Location[1] + 5]
		if key == 275:
			player.Location = [player.Location[0] + 5, player.Location[1]]
		if key == 276:
			player.Location = [player.Location[0] - 5, player.Location[1]]

	screen.fill([0,0,0])
	screen.blit(player.currentFrame, player.Location)
	pygame.display.flip()

pygame.quit()